<admintpl file="header" />
</head>
<body class="J_scroll_fixed">
	<div class="wrap js-check-wrap">
			<ul class="nav nav-tabs">
			<if condition="sp_auth_check(sp_get_current_admin_id(),'Data/Retain/index')">
				<li><a href="{:U('Data/Retain/index')}">总体数据</a></li>
			</if>
			<if condition="sp_auth_check(sp_get_current_admin_id(),'Data/Retain/agent')">
					<li><a href="{:U('Data/Retain/agent')}">渠道留存</a></li>
			</if>
			<if condition="sp_auth_check(sp_get_current_admin_id(),'Data/Retain/game')">
					<li><a href="{:U('Data/Retain/game')}">游戏留存</a></li>
			</if>
			<if condition="sp_auth_check(sp_get_current_admin_id(),'Data/Retain/agentgame')">
					<li  class="active"><a href="{:U('Data/Retain/agentgame')}">留存详细</a></li>
			</if>
		</ul>
		<form class="well form-search" method="post" action="{:U('Data/Retain/agentgame')}">		 			 
			<div class="search_type cc mb10">
				<div class="mb10">
					渠道账号： 					
					<select class="select_2" name="agent_id" id="selected_id">
							<foreach name="agents"  key="k" item="vo">
							<php>$aid_select=$k==$agent_id ?"selected":"";</php>
							<option value="{$k}"{$aid_select}>{$vo}</option>
							</foreach>
				    </select>
				    &nbsp;&nbsp; 
					游戏： 					
					<select class="select_2" name="app_id" id="selected_id">
							<foreach name="games"  key="k" item="vo">
							<php>$aid_select=$k==$app_id ?"selected":"";</php>
							<option value="{$k}"{$aid_select}>{$vo}</option>
							</foreach>
				    </select>
				    
					 &nbsp;&nbsp; &nbsp;
					<span class="mr20">
						时间：
						<input type="text" name="start_time" class="js-date" value="{$start_time|default=''}" style="width: 100px;"  autocomplete="off">-						
						<input type="text" class="js-date" name="end_time" value="{$end_time}" style="width: 100px;" autocomplete="off"> &nbsp; &nbsp;
						<input type="submit" class="btn btn-warning" name='date_time' value="搜索" />
						
					</span>
				</div>
			</div>
		</form>
		<form class="js-ajax-form" action="" method="post">
					<table class="table table-hover table-bordered table-list">
					<tr>
						<th style='color:#f00'>*隔天数据*</th>
					</tr>
			</table>
			&nbsp;&nbsp; 
			<table class="table table-hover table-bordered table-list">
				<thead>
					<tr>
						<th>日期</th>
						<th>渠道账号</th>
						<th>游戏名称</th>
						<th>注册人数</th>
						<th>二日</th>
						<th>三日</th>
						<th>四日</th>
						<th>五日</th>
						<th>六日</th>
						<th>七日</th>
						<th>15日</th>
						<th>30日</th>
					</tr>
				</thead>
				<foreach name="pays" item="vo">
					<tr> 
					    <td>{$vo['date']}</td>
					    <td>
							<if condition="$vo['agent_id'] eq 0">
								官包
							<else />
								{$agents[$vo['agent_id']]}
							</if>
						</td>
						<td>{$games[$vo['app_id']]}</td>
						<td>{$vo['reg_cnt']}</td>
						<td>{$vo['day2']}({$vo['day2']*100/$vo['reg_cnt']|number_format=2}%)</td>
						<td>{$vo['day3']}({$vo['day3']*100/$vo['reg_cnt']|number_format=2}%)</td>
						<td>{$vo['day4']}({$vo['day4']*100/$vo['reg_cnt']|number_format=2}%)</td>
						<td>{$vo['day5']}({$vo['day5']*100/$vo['reg_cnt']|number_format=2}%)</td>
						<td>{$vo['day6']}({$vo['day6']*100/$vo['reg_cnt']|number_format=2}%)</td>
						<td>{$vo['day7']}({$vo['day7']*100/$vo['reg_cnt']|number_format=2}%)</td>
						<td>{$vo['day15']}({$vo['day15']*100/$vo['reg_cnt']|number_format=2}%)</td>
						<td>{$vo['day30']}({$vo['day30']*100/$vo['reg_cnt']|number_format=2}%)</td>
					</tr>
				</foreach>
				<tfoot>
				</tfoot>
			</table>
			<div class="pagination">{$Page}</div>

		</form>
	</div>
	<script src="__PUBLIC__/js/common.js"></script>
	
</body>
</html>